package com.publiccms.entities.cms;
// Generated 2018-11-7 16:20:56 by Hibernate Tools 4.3.5.Final

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicUpdate;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * CmsComment generated by hbm2java
 */
@Entity
@Table(name = "cms_comment")
@DynamicUpdate
public class CmsComment implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @GeneratorColumn(title = "ID")
    private Long id;
    @GeneratorColumn(title = "站点", condition = true)
    @JsonIgnore
    private short siteId;
    /**
     * user id
     * <p>
     * 发布用户id
     */
    @GeneratorColumn(title = "发布用户", condition = true)
    private long userId;
    /**
     * reply comment id
     * <p>
     * 回复评论id
     */
    @GeneratorColumn(title = "回复评论", condition = true)
    private Long replyId;
    /**
     * reply user id
     * <p>
     * 回复用户id
     */
    @GeneratorColumn(title = "回复用户", condition = true)
    private Long replyUserId;
    /**
     * replies
     * <p>
     * 回复数
     */
    @GeneratorColumn(title = "回复数")
    private int replies;
    /**
     * scores
     * <p>
     * 分数
     */
    @GeneratorColumn(title = "分数", order = true)
    private int scores;
    /**
     * content id
     * <p>
     * 内容id
     */
    @GeneratorColumn(title = "内容", condition = true)
    private long contentId;
    /**
     * ip
     */
    @GeneratorColumn(title = "IP")
    private String ip;
    /**
     * check user
     * <p>
     * 审核用户
     */
    @GeneratorColumn(title = "审核用户", condition = true)
    private Long checkUserId;
    /**
     * check date
     * <p>
     * 审核日期
     */
    @GeneratorColumn(title = "审核日期", order = true)
    private Date checkDate;
    /**
     * update date
     * <p>
     * 更新日期
     */
    @GeneratorColumn(title = "更新日期", order = true)
    private Date updateDate;
    /**
     * create date
     * <p>
     * 创建日期
     */
    @GeneratorColumn(title = "创建日期", order = true)
    private Date createDate;
    /**
     * status(1:Published,2:Pending)
     * <p>
     * 状态(1:已审核,2:待审核)
     */
    @GeneratorColumn(title = "状态", condition = true)
    private int status;
    @GeneratorColumn(title = "已删除", condition = true)
    @JsonIgnore
    private boolean disabled;
    /**
     * 
     */
    @GeneratorColumn(title = "内容")
    private String text;

    public CmsComment() {
    }

    public CmsComment(short siteId, long userId, int replies, int scores, long contentId, String ip, Date createDate, int status,
            boolean disabled) {
        this.siteId = siteId;
        this.userId = userId;
        this.replies = replies;
        this.scores = scores;
        this.contentId = contentId;
        this.ip = ip;
        this.createDate = createDate;
        this.status = status;
        this.disabled = disabled;
    }

    public CmsComment(short siteId, long userId, Long replyId, Long replyUserId, int replies, int scores, long contentId,
            String ip, Long checkUserId, Date checkDate, Date updateDate, Date createDate, int status, boolean disabled,
            String text) {
        this.siteId = siteId;
        this.userId = userId;
        this.replyId = replyId;
        this.replyUserId = replyUserId;
        this.replies = replies;
        this.scores = scores;
        this.contentId = contentId;
        this.ip = ip;
        this.checkUserId = checkUserId;
        this.checkDate = checkDate;
        this.updateDate = updateDate;
        this.createDate = createDate;
        this.status = status;
        this.disabled = disabled;
        this.text = text;
    }

    @Id
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "site_id", nullable = false)
    public short getSiteId() {
        return this.siteId;
    }

    public void setSiteId(short siteId) {
        this.siteId = siteId;
    }

    @Column(name = "user_id", nullable = false)
    public long getUserId() {
        return this.userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "reply_id")
    public Long getReplyId() {
        return this.replyId;
    }

    public void setReplyId(Long replyId) {
        this.replyId = replyId;
    }

    @Column(name = "reply_user_id")
    public Long getReplyUserId() {
        return this.replyUserId;
    }

    public void setReplyUserId(Long replyUserId) {
        this.replyUserId = replyUserId;
    }

    @Column(name = "replies", nullable = false)
    public int getReplies() {
        return this.replies;
    }

    public void setReplies(int replies) {
        this.replies = replies;
    }

    @Column(name = "scores", nullable = false)
    public int getScores() {
        return this.scores;
    }

    public void setScores(int scores) {
        this.scores = scores;
    }

    @Column(name = "content_id", nullable = false)
    public long getContentId() {
        return this.contentId;
    }

    public void setContentId(long contentId) {
        this.contentId = contentId;
    }

    @Column(name = "ip", nullable = false, length = 130)
    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "check_user_id")
    public Long getCheckUserId() {
        return this.checkUserId;
    }

    public void setCheckUserId(Long checkUserId) {
        this.checkUserId = checkUserId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "check_date", length = 19)
    public Date getCheckDate() {
        return this.checkDate;
    }

    public void setCheckDate(Date checkDate) {
        this.checkDate = checkDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_date", length = 19)
    public Date getUpdateDate() {
        return this.updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column(name = "status", nullable = false)
    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name = "disabled", nullable = false)
    public boolean isDisabled() {
        return this.disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    @Column(name = "text", length = 65535)
    public String getText() {
        return this.text;
    }

    public void setText(String text) {
        this.text = text;
    }

}
